home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / prgs / Gfx / IFF.b < prev    next >
Text File  |  1996-09-11  |  597b  |  35 lines

  1. '..Display an IFF picture on an appropriate screen.
  2.  
  3. SUB cleanup
  4.   screen close 1
  5.   iff close #1
  6. END SUB
  7.  
  8. f$ = FileBox$("Select an IFF file")
  9. if f$="" then stop
  10.  
  11. iff open #1,f$
  12.  
  13. if Err <> 0 then 
  14.   MsgBox f$+" is not an IFF file.","Continue"
  15.   stop
  16. end if
  17.  
  18. 'print iff(1,1),iff(1,2),iff(1,3),iff(1,4)
  19.  
  20. screen 1,iff(1,1),iff(1,2),iff(1,3),iff(1,4)
  21.  
  22. if Err then 
  23.   MsgBox "Unable to open screen.","Continue"
  24.   iff close #1
  25. else
  26.   iff read #1,1
  27.   if Err then 
  28.     MsgBox "Error reading "+f$+".","Continue"
  29.     cleanup
  30.   else
  31.     while inkey$="" and NOT mouse(0):sleep:wend
  32.     cleanup
  33.   end if
  34. end if
  35.